<?php
$this->title = "Expediente";
$this->headTitle($this->title);
?>

 <div class="pure-form pure-form-aligned">       
    <form class="pure-form pure-form-aligned" enctype="application/x-www-form-urlencoded" action="<?php echo $this->url(array('controller'=>'Record',
            'action'=>'index'));?>" method="post" id = 'form'>
 
    <fieldset>
        <legend>Buscar</legend>
        <div class="pure-g-r">
            <div class="pure-u-1-3">  
                <div class="pure-control-group">
                    <label for="placa" >Cliente </label>    
                    <input type="text" name="nombre" value="" placeholder="Nombre de Cliente" />
                </div>  
            </div>
             <div class="pure-u-1-3">  
                <div class="pure-control-group">
                    <label for="placa" >C&eacute;dula </label>    
                    <input type="text" name="cedula" value="" placeholder="# de identificaci&oacute;n" />
                </div>  
            </div>
            <div class="pure-u-1-3">  
                <div class="pure-control-group">
                    <label for="placa" >Placa </label>    
                    <input type="text" name="placa" value="" placeholder="# de Placa" />
                </div>  
            </div>
             <div class="pure-u-1-3">  
                <div class="pure-control-group">
                    <label for="date_start" class="required">Fecha Inicial </label>    
                    <input type="text" name="date_start" value="<?php echo date('Y-m-d'); ?>" id="date_start" placeholder="Fecha Inicial" />
                </div>  
            </div>
             <div class="pure-u-1-3">  
                <div class="pure-control-group">
                    <label for="date_end" class="required">Fecha Final </label>    
                    <input type="text" name="date_end" value="<?php echo date('Y-m-d'); ?>" id="date_end" placeholder="Fecha Final"/>
                </div>  
            </div>
            <div class="pure-u-1-3"> 
                <div class="pure-control-group">
                    <label ></label>
                    <input class="pure-button pure-button-primary" type="submit" name="submit" id="submitbutton" value="Buscar"/>
                </div>   
            </div>                       
        </div>
             
        <div class="alignTableMaintenance">
        <?php if(count($this->expedientes) != 0 ):?>
            <table class="pure-table pure-table-bordered">
            <thead>
                <tr>
                    <th>Fecha</th>
                    <th>Placa</th>                    
                    <th>Observaciones</th>
                    <th>Repuestos</th>
                    <th>Servicios</th>
                     <th>Total</th>
                    
                </tr>
            </thead>
            <tbody>
                <?php foreach($this->expedientes as $expediente) : ?>
                <tr>
                    <td><?php echo $this->escape($expediente['fecha']);?></td>
                    <td><?php echo $this->escape($expediente['placa']);?></td>                    
                    <td><?php echo $this->escape($expediente['observaciones']);?></td>
                    <td><?php echo $this->escape($expediente['totalRepuesto']);?></td>
                    <td><?php echo $this->escape($expediente['totalServicio']);?></td>
                    <td><?php echo $this->escape($expediente['totalServicio']) + $this->escape($expediente['totalRepuesto']);?></td>
                   
                   
                </tr>
                <?php endforeach; ?>
            </tbody>
            </table>
        
        
        <?php endif ?> 
     </div>
    </fieldset>
    </form>    
</div>